home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_ncurses.idb / usr / freeware / catman / u_man / cat1 / tset.Z / tset
Encoding:
Text File  |  1999-07-16  |  13.0 KB  |  331 lines

  1.  
  2.  
  3.  
  4.      ttttsssseeeetttt((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV               ttttsssseeeetttt((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       ttttsssseeeetttt - terminal initialization
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       tset [-IQqrs]    [-] [-e    _c_h] [-i    _c_h] [-k    _c_h] [-m    _m_a_p_p_i_n_g]
  13.       [_t_e_r_m_i_n_a_l]
  14.       reset    [-IQqrs] [-] [-e _c_h] [-i _c_h] [-k _c_h] [-m _m_a_p_p_i_n_g]
  15.       [_t_e_r_m_i_n_a_l]
  16.  
  17.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.       TTTTsssseeeetttt initializes terminals.  TTTTsssseeeetttt first determines the type
  19.       of terminal that you are using.  This    determination is done
  20.       as follows, using the    first terminal type found.
  21.  
  22.       1. The tttteeeerrrrmmmmiiiinnnnaaaallll argument specified on    the command line.
  23.  
  24.       2. The value of the TTTTEEEERRRRMMMM environmental variable.
  25.  
  26.       3. (BSD systems only.) The terminal type associated with the
  27.       standard error output    device in the /_e_t_c/_t_t_y_s    file.  (On
  28.       Linux    and System-V-like UNIXes, _g_e_t_t_y    does this job by
  29.       setting TTTTEEEERRRRMMMM according to the    type passed to it by
  30.       /_e_t_c/_i_n_i_t_t_a_b.)
  31.  
  32.       4. The default terminal type,    ``unknown''.
  33.  
  34.       If the terminal type was not specified on the    command-line,
  35.       the -m option    mappings are then applied (see below for more
  36.       information).     Then, if the terminal type begins with    a
  37.       question mark    (``?''), the user is prompted for confirmation
  38.       of the terminal type.     An empty response confirms the    type,
  39.       or, another type can be entered to specify a new type.  Once
  40.       the terminal type has    been determined, the terminfo entry
  41.       for the terminal is retrieved.  If no    terminfo entry is
  42.       found    for the    type, the user is prompted for another
  43.       terminal type.
  44.  
  45.       Once the terminfo entry is retrieved,    the window size,
  46.       backspace, interrupt and line    kill characters    (among many
  47.       other    things)    are set    and the    terminal and tab
  48.       initialization strings are sent to the standard error
  49.       output.  Finally, if the erase, interrupt and    line kill
  50.       characters have changed, or are not set to their default
  51.       values, their    values are displayed to    the standard error
  52.       output.
  53.  
  54.       When invoked as rrrreeeesssseeeetttt, ttttsssseeeetttt sets cooked and echo modes,
  55.       turns    off cbreak and raw modes, turns    on newline translation
  56.       and resets any unset special characters to their default
  57.       values before    doing the terminal initialization described
  58.       above.  This is useful after a program dies leaving a
  59.       terminal in an abnormal state.  Note,    you may    have to    type
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 5/12/99)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      ttttsssseeeetttt((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV               ttttsssseeeetttt((((1111))))
  71.  
  72.  
  73.  
  74.           <<<<LLLLFFFF>>>>rrrreeeesssseeeetttt<<<<LLLLFFFF>>>>
  75.  
  76.       (the line-feed character is normally control-J) to get the
  77.       terminal to work, as carriage-return may no longer work in
  78.       the abnormal state.  Also, the terminal will often not echo
  79.       the command.
  80.  
  81.       The options are as follows:
  82.  
  83.       -q   The terminal type is displayed to the standard output,
  84.            and the terminal    is not initialized in any way.    The
  85.            option `-' by itself is equivalent but archaic.
  86.  
  87.       -e   Set the erase character to _c_h.
  88.  
  89.       -I   Do not send the terminal    or tab initialization strings
  90.            to the terminal.
  91.  
  92.       -i   Set the interrupt character to _c_h.
  93.  
  94.       -k   Set the line kill character to _c_h.
  95.  
  96.       -m   Specify a mapping from a    port type to a terminal.  See
  97.            below for more information.
  98.  
  99.       -Q   Don't display any values    for the    erase, interrupt and
  100.            line kill characters.
  101.  
  102.       -r   Print the terminal type to the standard error output.
  103.  
  104.       -s   Print the sequence of shell commands to initialize the
  105.            environment variable TTTTEEEERRRRMMMM to the    standard output.  See
  106.            the section below on setting the    environment for
  107.            details.
  108.  
  109.       The arguments    for the    -e, -i,    and -k options may either be
  110.       entered as actual characters or by using the `hat' notation,
  111.       i.e. control-h may be    specified as ``^H'' or ``^h''.
  112.  
  113.      SSSSEEEETTTTTTTTIIIINNNNGGGG TTTTHHHHEEEE EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  114.       It is    often desirable    to enter the terminal type and
  115.       information about the    terminal's capabilities    into the
  116.       shell's environment.    This is    done using the -s option.
  117.  
  118.       When the -s option is    specified, the commands    to enter the
  119.       information into the shell's environment are written to the
  120.       standard output.  If the SSSSHHHHEEEELLLLLLLL environmental variable    ends
  121.       in ``csh'', the commands are for ccccsssshhhh,    otherwise, they    are
  122.       for sssshhhh.  Note, the ccccsssshhhh commands set and unset    the shell
  123.       variable nnnnoooogggglllloooobbbb, leaving it unset.  The following line in
  124.       the ....llllooooggggiiiinnnn or    ....pppprrrrooooffffiiiilllleeee files will initialize the environment
  125.       correctly:
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 5/12/99)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      ttttsssseeeetttt((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV               ttttsssseeeetttt((((1111))))
  137.  
  138.  
  139.  
  140.           eval `tset -s options ...    `
  141.  
  142.  
  143.      TTTTEEEERRRRMMMMIIIINNNNAAAALLLL TTTTYYYYPPPPEEEE MMMMAAAAPPPPPPPPIIIINNNNGGGG
  144.       When the terminal is not hardwired into the system (or the
  145.       current system information is    incorrect) the terminal    type
  146.       derived from the /_e_t_c/_t_t_y_s file or the TTTTEEEERRRRMMMM environmental
  147.       variable is often something generic like nnnneeeettttwwwwoooorrrrkkkk, ddddiiiiaaaalllluuuupppp, or
  148.       uuuunnnnkkkknnnnoooowwwwnnnn.  When ttttsssseeeetttt is used in a startup script it is    often
  149.       desirable to provide information about the type of terminal
  150.       used on such ports.
  151.  
  152.       The purpose of the -m    option is to map from some set of
  153.       conditions to    a terminal type, that is, to tell ttttsssseeeetttt ``If
  154.       I'm on this port at a    particular speed, guess    that I'm on
  155.       that kind of terminal''.
  156.  
  157.       The argument to the -m option    consists of an optional    port
  158.       type,    an optional operator, an optional baud rate
  159.       specification, an optional colon (``:'') character and a
  160.       terminal type.  The port type    is a string (delimited by
  161.       either the operator or the colon character).    The operator
  162.       may be any combination of ``>'', ``<'', ``@'', and ``!'';
  163.       ``>''    means greater than, ``<'' means    less than, ``@'' means
  164.       equal    to and ``!'' inverts the sense of the test.  The baud
  165.       rate is specified as a number    and is compared    with the speed
  166.       of the standard error    output (which should be    the control
  167.       terminal).  The terminal type    is a string.
  168.  
  169.       If the terminal type is not specified    on the command line,
  170.       the -m mappings are applied to the terminal type.  If    the
  171.       port type and    baud rate match    the mapping, the terminal type
  172.       specified in the mapping replaces the    current    type.  If more
  173.       than one mapping is specified, the first applicable mapping
  174.       is used.
  175.  
  176.       For example, consider    the following mapping:
  177.       ddddiiiiaaaalllluuuupppp>>>>9999666600000000::::vvvvtttt111100000000.  The port type is dialup ,    the operator
  178.       is >,    the baud rate specification is 9600, and the terminal
  179.       type is vt100.  The result of    this mapping is    to specify
  180.       that if the terminal type is ddddiiiiaaaalllluuuupppp, and the baud rate is
  181.       greater than 9600 baud, a terminal type of vvvvtttt111100000000 will    be
  182.       used.
  183.  
  184.       If no    baud rate is specified,    the terminal type will match
  185.       any baud rate.  If no    port type is specified,    the terminal
  186.       type will match any port type.  For example, ----mmmm ddddiiiiaaaalllluuuupppp::::vvvvtttt111100000000
  187.       ----mmmm ::::????xxxxtttteeeerrrrmmmm will cause    any dialup port, regardless of baud
  188.       rate,    to match the terminal type vt100, and any non-dialup
  189.       port type to match the terminal type ?xterm.    Note, because
  190.       of the leading question mark,    the user will be queried on a
  191.       default port as to whether they are actually using an    xterm
  192.  
  193.  
  194.  
  195.      Page 3                         (printed 5/12/99)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      ttttsssseeeetttt((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV               ttttsssseeeetttt((((1111))))
  203.  
  204.  
  205.  
  206.       terminal.
  207.  
  208.       No whitespace    characters are permitted in the    -m option
  209.       argument.  Also, to avoid problems with meta-characters, it
  210.       is suggested that the    entire -m option argument be placed
  211.       within single    quote characters, and that ccccsssshhhh users insert a
  212.       backslash character (``\'') before any exclamation marks
  213.       (``!'').
  214.  
  215.      HHHHIIIISSSSTTTTOOOORRRRYYYY
  216.       The ttttsssseeeetttt command appeared in BSD 3.0.     The nnnnccccuuuurrrrsssseeeessss
  217.       implementation was lightly adapted from the 4.4BSD sources
  218.       for a    terminfo environment by    Eric S.    Raymond
  219.       <esr@snark.thyrsus.com>.
  220.  
  221.      CCCCOOOOMMMMPPPPAAAATTTTIIIIBBBBIIIILLLLIIIITTTTYYYY
  222.       The ttttsssseeeetttt utility has been provided for backward-
  223.       compatibility    with BSD environments (under most modern
  224.       UNIXes, ////eeeettttcccc////iiiinnnniiiittttttttaaaabbbb and _g_e_t_t_y(1) can    set TTTTEEEERRRRMMMM appropriately
  225.       for each dial-up line; this obviates what was    ttttsssseeeetttt's most
  226.       important use).  This    implementation behaves like 4.4BSD
  227.       tset,    with a few exceptions specified    here.
  228.  
  229.       The -S option    of BSD tset no longer works; it    prints an
  230.       error    message    to stderr and dies.  The -s option only    sets
  231.       TTTTEEEERRRRMMMM,    not TTTTEEEERRRRMMMMCCCCAAAAPPPP....  BBBBooootttthhhh tttthhhheeeesssseeee cccchhhhaaaannnnggggeeeessss aaaarrrreeee bbbbeeeeccccaaaauuuusssseeee tttthhhheeee
  232.       TTTTEEEERRRRMMMMCCCCAAAAPPPP variable is no longer    supported under    terminfo-based
  233.       nnnnccccuuuurrrrsssseeeessss, which makes ttttsssseeeetttt ----SSSS useless (we made    it die noisily
  234.       rather than silently induce lossage).
  235.  
  236.       There    was an undocumented 4.4BSD feature that    invoking tset
  237.       via a    link named `TSET` (or via any other name beginning
  238.       with an upper-case letter) set the terminal to use upper-
  239.       case only.  This feature has been omitted.
  240.  
  241.       The -A, -E, -h, -u and -v options were deleted from the ttttsssseeeetttt
  242.       utility in 4.4BSD. None of them were documented in 4.3BSD
  243.       and all are of limited utility at best. The -a, -d, and -p
  244.       options are similarly    not documented or useful, but were
  245.       retained as they appear to be    in widespread use.  It is
  246.       strongly recommended that any    usage of these three options
  247.       be changed to    use the    -m option instead.  The    -n option
  248.       remains, but has no effect.  The -adnp options are therefore
  249.       omitted from the usage summary above.
  250.  
  251.       It is    still permissible to specify the -e, -i, and -k
  252.       options without arguments, although it is strongly
  253.       recommended that such    usage be fixed to explicitly specify
  254.       the character.
  255.  
  256.       As of    4.4BSD,    executing ttttsssseeeetttt as rrrreeeesssseeeetttt    no longer implies the
  257.       -Q option.  Also, the    interaction between the    - option and
  258.  
  259.  
  260.  
  261.      Page 4                         (printed 5/12/99)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      ttttsssseeeetttt((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV               ttttsssseeeetttt((((1111))))
  269.  
  270.  
  271.  
  272.       the _t_e_r_m_i_n_a_l argument    in some    historic implementations of
  273.       ttttsssseeeetttt has been    removed.
  274.  
  275.      EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  276.       The ttttsssseeeetttt command uses    the SSSSHHHHEEEELLLLLLLL and TTTTEEEERRRRMMMM environment
  277.       variables.
  278.  
  279.      FFFFIIIILLLLEEEESSSS
  280.       /etc/ttys
  281.            system port name    to terminal type mapping database (BSD
  282.            versions    only).
  283.  
  284.       @DATADIR@/terminfo
  285.            terminal    capability database
  286.  
  287.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  288.       csh(1), sh(1), stty(1), tty(4), termcap(5), ttys(5),
  289.       environ(7)
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                         (printed 5/12/99)
  328.  
  329.  
  330.  
  331.